package com.edu.system.domain;

import java.util.Date;
import java.util.List;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.edu.common.annotation.EditGroup;
import com.edu.common.annotation.Excel;
import com.edu.common.annotation.ImportGroup;
import com.edu.common.constant.CacheConstants;
import com.edu.common.core.domain.BaseEntity;

import lombok.Data;

/**
 * 【请填写功能名称】对象 student
 *
 * @author xxxx
 * @date 2023-12-16
 */
@Data
public class Student extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    private Long id;

    /**
     * 姓名
     */
    @Excel(name = "姓名")
    @NotBlank(message = "姓名不能为空", groups = {EditGroup.class, ImportGroup.class})
    private String name;

    /**
     * 学号
     */
    @Excel(name = "教育ID")
    @NotBlank(message = "教育ID不能为空", groups = {EditGroup.class, ImportGroup.class})
    private String stuNo;

    /**
     * 出生日期
     */
//    @Excel(name = "出生日期", dateFormat = "yyyy-MM-dd")
    private Date birthday;


    /**
     * 届别，01届
     */
    @Excel(name = "届别")
    @NotBlank(message = "届别不能为空", groups = {ImportGroup.class})
    private String generation;

    /**
     * $column.columnComment
     */
    private Long gradeId;

    /**
     * 年级
     */
    private String grade;

    /**
     * 班级id
     */
    @NotNull(message = "班级不能为空", groups = {EditGroup.class})
    private Long classId;

    /**
     * 冗余班级名称
     */
    @Excel(name = "班级")
    @NotBlank(message = "班级不能为空", groups = {ImportGroup.class})
    private String className;

    /**
     * 学生类型
     */
    @Excel(name = "学生类型", dictType = CacheConstants.STUDENT_TYPE_CACHE_KEY)
    private Integer studentType;
    
    private String studentTypeName;

    /**
     * 0_女；1_男
     */
    @Excel(name = "性别", readConverterExp = "0=女,1=男")
    private Integer gender;

    /**
     * 联系电话
     */
//    @Excel(name = "联系电话")
    private String phone;

    /**
     * 备用电话
     */
//    @Excel(name = "备用电话")
    private String pPhone;

//    @Excel(name = "0_正常；1_贫困", readConverterExp = "0=正常,1=贫困")
    private Integer isFree;

    /**
     * 状态0_正常；1_退学
     */
//    @Excel(name = "状态", readConverterExp = "0=正常,1=退学")
    private Integer status;

    /**
     * $column.columnComment
     */
    private String comment;

    /**
     * $column.columnComment
     */
    @Excel(name = "地址")
    private String address;

    /**
     * $column.columnComment
     */
    private String gmtCreated;

    /**
     * $column.columnComment
     */
    private String gmtModified;

    /**
     * $column.columnComment
     */
    private Long creator;

    /**
     * $column.columnComment
     */
    private Long modifier;

    /**
     * $column.columnComment
     */
//    @Excel(name = "是否删除", readConverterExp = "$column.readConverterExp()")
    private Integer isDeleted;

    private List<String> stuNos;

    private List<String> tags;
    
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
//                .append("eduId", getEduId())
                .append("name", getName())
                .append("stuNo", getStuNo())
                .append("gender", getGender())
                .append("birthday", getBirthday())
                .append("generation", getGeneration())
                .append("gradeId", getGradeId())
                .append("grade", getGrade())
                .append("classId", getClassId())
                .append("className", getClassName())
                .append("studentType", getStudentType())
                .append("phone", getPhone())
                .append("pPhone", getPPhone())
                .append("isFree", getIsFree())
                .append("status", getStatus())
                .append("comment", getComment())
                .append("address", getAddress())
                .append("gmtCreated", getGmtCreated())
                .append("gmtModified", getGmtModified())
                .append("creator", getCreator())
                .append("modifier", getModifier())
                .append("isDeleted", getIsDeleted())
                .toString();
    }
}
